<template>
	<view class="">
		<view class="goods-list card_b">
			<scroll-view scroll-y style="max-height: 800rpx;">
				<view class="cart_box" v-if="homeTodayObj">
					<view class="item_list" v-if="
						(homeTodayObj.meals1&&homeTodayObj.meals1.comboList&&homeTodayObj.meals1.comboList.length > 0 )||  
						(homeTodayObj.meals1&&homeTodayObj.meals1.comboList&&homeTodayObj.meals1.dishList.length > 0) ||  
						(homeTodayObj.meals2&&homeTodayObj.meals2.comboList&&homeTodayObj.meals2.comboList.length > 0) ||  
						(homeTodayObj.meals2&&homeTodayObj.meals2.comboList&&homeTodayObj.meals2.dishList.length > 0) ">
						<!-- <view class="cart_date">
							{{homeTodayObj.fullDate.replace(/-/g, "/")}}
						</view> -->
						<view class=""
							v-if="homeTodayObj.meals1 && (homeTodayObj.meals1.comboList.length > 0 || homeTodayObj.meals1.dishList.length > 0 )">
							<orderTitle content="早餐"></orderTitle>

							<setMealOrder v-for="d in homeTodayObj.meals1.comboList" :date="date" :item="d">
							</setMealOrder>
							<setMealOrder v-for="d in homeTodayObj.meals1.dishList" :date="date" :item="d">
							</setMealOrder>
						</view>
						<view class=""
							v-if="homeTodayObj.meals2 && (homeTodayObj.meals2.comboList.length > 0 ||homeTodayObj.meals2.dishList.length > 0 )">
							<orderTitle content="午餐"></orderTitle>
							<setMealOrder v-for="d in homeTodayObj.meals2.comboList" :date="date" :item="d">
							</setMealOrder>
							<setMealOrder v-for="d in homeTodayObj.meals2.dishList" :date="date" :item="d">
							</setMealOrder>
						</view>
					</view>
				</view>
			</scroll-view>


			<!-- <view class="total flex_between">
				<view class="">合计
				</view>
				<view class="price">¥ <span
						style="font-size: 44rpx;margin-left: 6rpx;">{{ selectedSummary.totalPrice.toFixed(2) }}</span>
				</view>
			</view> -->
		</view>
	</view>
</template>


<script>
	import setMealOrder from '@/components/common/setMealOrder.vue'
	import orderTitle from '@/components/common/orderTitle.vue'
	export default {
		components: {
			setMealOrder,
			orderTitle
		},
		props: {
			homeTodayObj: {
				type: Object,
				default: () => {}
			},
			date:{
				type:String,
				default: () => {}
			}
		},
		mounted() {
			console.log(this.date)
		},
		data() {
			return {}
		}
	}
</script>

<style lang="scss" scoped>

</style>